home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!j-bg.demon.co.uk
- From: John Sargent <jb@j-bg.demon.co.uk>
- Newsgroups: comp.lang.c++
- Subject: Re: Array pointer?
- Date: Thu, 18 Apr 96 18:06:11 GMT
- Message-ID: <829850771snz@j-bg.demon.co.uk>
- References: <DppIHL.MzF@on.bell.ca> <829513366snz@j-bg.demon.co.uk> <4l4f73$1a8_004@donstarr.best.com>
- Reply-To: jb@j-bg.demon.co.uk
- X-NNTP-Posting-Host: j-bg.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.29
- X-Mail2News-Path: j-bg.demon.co.uk
-
- In article <4l4f73$1a8_004@donstarr.best.com>
- super@donstarr.org "Don Starr" writes:
-
- > *
- > * [OK stuff clipped]
- > *
- > *> ; is this correct, too?
- > *> int *c3
- > *>
- > *> c3 = (a + 3 * sizeof(int) );
- > *> count << *c3;
- > *>
- > *
- > * OK. you'll get the contents of a[3]
- >
- > No, you'll get the contents of a[ 3 * sizeof(int) ]. The compiler will handle
- > the sizeof when it does the pointer arithmetic.
-
-
- Oops. You're right.
-
-
- Regards,
- John Sargent
-